package com.maychat.service;

import com.maychat.enums.JoinType;
import com.maychat.enums.UserContactStatus;
import com.maychat.exception.BusinessException;
import com.maychat.pojo.*;
import com.maychat.pojo.extended.UserContactApplyWithGroupNameAndNickName;

import java.util.List;
import java.util.Map;

public interface UserContactService {
    List<UserContact> selectUserContacts(UserContact query);

    Map<String, Object> searchById(String userId, String targetId) throws BusinessException;

    JoinType addApply(UserInfoToken tokenObj, String targetId, String applyInfo) throws BusinessException;

    RowsWithTotal<UserContactApplyWithGroupNameAndNickName> selectUserContactPageByUserId(String userId, Integer page, Integer pageSize);

    void dealApply(String userId, Integer applyId, Integer actionType) throws BusinessException;

    void addContact(String applyUserId, String receiveUserId, String contactId, Integer contactType, String applyInfo) throws BusinessException;

    List<UserInfo> selectFriendUsers(String userId);

    List<GroupInfo> selectFriendGroups(String userId);

    void rmUserContact(String userId, String contactId, UserContactStatus userContactStatus);

    void addRobot(String uid);
}
